package cn.edu.nwafu.core.controller.admin;

import cn.edu.nwafu.common.result.R;
import cn.edu.nwafu.core.pojo.vo.TicketInfoVo;
import cn.edu.nwafu.core.service.TicketInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/admin/core/ticketInfo")
@Api(tags = "机票管理")
public class AdminTicketInfoController {

    @Autowired
    private TicketInfoService ticketInfoService;

    @ApiOperation("获取机票信息分页列表")
    @GetMapping("/list")
    public R getList() {

        List<TicketInfoVo> ticketInfoVo = ticketInfoService.listInfoVo();


        return R.ok().data("list", ticketInfoVo);
    }

}
